class <%= contract_name.classify %>
  include Etheruby::Contract
  at_address <%= contract_address %>

  <%contract_abi.each do |abi|%>
    <%if abi['type'] == 'function' #and abi['constant'] == false%>
  contract_method :<%=abi['name']%> do
        <%if abi['inputs'].size > 0%>
            <%param_str = abi['inputs'].collect { |item| [':' + item['type']] }.join(", ")%>
    parameters <%=param_str%>
        <%end%>
        <%if abi['outputs'].size > 0%>
            <%param_str = abi['outputs'].collect { |item| [':' + item['type']] }.join(", ")%>
    returns <%=param_str%>
        <%end%>
  end

    <%end%>
  <%end%>
end